class LoginModel{
  String? username;
  String? password;
  String? flights;// 班次：早中晚
  String? team;// 班组：ABC

  LoginModel({this.username,this.password,this.flights,this.team});
  factory LoginModel.fromJson(Map<String,dynamic> map){
    return LoginModel(
      username: map['username'],
      password: map['password'],
      flights: map['flights'],
      team: map['team']
    );
  }

  factory LoginModel.empty(){
    return LoginModel(username: '', password: '', flights: '', team: '');
  }

  Map<String,dynamic> toJson(){
    Map<String,dynamic> ret = {};
    ret['username'] = username ?? '';
    ret['password'] = password ?? '';
    ret['flights'] = flights ?? '';
    ret['team'] = team ?? '';
    return ret;
  }

  @override
  String toString() {
    return 'username:$username,password:$password,flights:$flights,team:$team';
  }
}
